﻿<?php
    include('checkAdminAccess.php');
    $iniVars = parse_ini_file('../../config.ini',TRUE);
    include('../classes/adodb5/adodb.inc.php');
    include('../function/db.func.php');
    
    
    $msg1Th = $_POST['msg1Th'];
    $msg2Th = $_POST['msg2Th'];
    $msg1En = $_POST['msg1En'];
    $msg2En = $_POST['msg2En'];
    $msg1Jp = $_POST['msg1Jp'];
    $msg2Jp = $_POST['msg2Jp'];
    $msg1Ch = $_POST['msg1Ch'];
    $msg2Ch = $_POST['msg2Ch'];
    
    $sql = 'UPDATE text_data SET td_value="'.$msg1Th.'" WHERE td_id=20';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg2Th.'" WHERE td_id=21';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg1En.'" WHERE td_id=22';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg2En.'" WHERE td_id=23';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg1Jp.'" WHERE td_id=24';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg2Jp.'" WHERE td_id=25';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg1Ch.'" WHERE td_id=26';
    $result = $db->Execute($sql);
    $sql = 'UPDATE text_data SET td_value="'.$msg2Ch.'" WHERE td_id=27';
    $result = $db->Execute($sql);
    if($result)
    {
        echo "success";
    }
    else
    {
        echo "fail";
    }
   
?>